import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 保险信息查询
export const getinsuranceList = params =>
  axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/insuranceRemind`, {
    params
  });
// 查询险种
export const getinsuranceType = params =>
  axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/insuranceRemind/insuranceTypeName`, {
    params
  });
// 提醒查询回显
export const queryRemind = params =>
  axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/insuranceRemind/dict/${params.VIN}/duct/${params.OWNER_NO}`, {
    params
  });
// 新增保险提醒记录
export const addInsuranceRemind = params => axios.post(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/insuranceRemind/${params.VIN}/${params.OWNER_NO}`, params);
// 查询提醒记录
export const queryRemindRecord = params =>
  axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/insuranceRemind/${params.VIN}/${params.OWNER_NO}`, {
    params
  });
// 查询销售回访信息
export const querySalesReturn = params =>
  axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/insuranceRemind/sales/${params.VIN}/${params.OWNER_NO}`, {
    params
  });
// 查询投保单历史
export const queryHistory = (VIN, params) =>
  axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/insuranceRemind/history/${VIN}`, {
    params
  });
// 导入功能
export const importRemind = params => axios.post(`${SERVER.DMSCLOUD_REPAIR}/customerFeign/Remind/`, params);
// 品牌 - 下拉框
export const getPinpSelect = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/baseData/repair/brandSelect`, {
    params
  });

// 险种 - 下拉框
export const getInsuranceType = params =>
  axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/insuranceRemind/insuranceTypeName`, {
    params
  });

// 车系 - 下拉框(根据品牌的id)
export const getChexSelect = (brandId, params) =>
  axios.get(`/api/basedata/vehicleProduct/brandsdict/${brandId}/seriessdict`, {
    params
  });

// 车型 - 下拉框()
export const getCheModelSelect = (brandsid, seriessid, params) =>
  axios.get(`/api/basedata/vehicleProduct/brandsdict/${brandsid}/seriessdict/${seriessid}/modelsdict`, {
    params
  });

// 保险公司 - 下拉框
export const getBxgsSelect = params =>
  axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/basedata/insuranceCo/insurance/dicts`, {
    params
  });
// 分派
export const remindAssign = params =>
  axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/lossRemind/remindAssign`, {
    params
  });
// 查询所有员工
export const getDealerUser = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/basedata/users/getDealerUser`);
// TABLE中翻译品牌
export const getBrand = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/baseData/basicData/brand`, {
    params
  });
// TABLE中翻译车系
export const getSeries = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/baseData/basicData/series`, {
    params
  });
// TABLE中翻译车型
export const getModel = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/baseData/basicData/model`, {
    params
  });
// TABLE中翻译省份城市
export const getRegion = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/baseData/basicData/region`, {
    params
  });
//
// 保险到期提醒导出
export const getExcelList = params =>
  axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/insuranceRemind/export`, {
    params,
    responseType: 'arraybuffer'
  });
// 续保专员
export const getInsuranceAdvisor = params => axios.get(`/api/sysManage/basedata/users/getUserListByRole?role=10071015`);
// 定保专员
export const getMaintainAdvisor = params => axios.get(`/api/sysManage/basedata/users/getUserListByRole?role=10071016`);
// 客户专员
export const getDcrcAdvisor = params => axios.get(`/api/sysManage/basedata/users/getUserListByRole?role=10071017`);
// 车系（索赔专用）
export const getClaimSeries = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/baseData/basicData/claimSeries`, {
    params
  });
